import 'package:dali_ng_pera/page/browser/dnp_browser_page.dart';
import 'package:dali_ng_pera/page/certification/dnp_certification_common_from_page.dart';
import 'package:dali_ng_pera/page/certification/dnp_emergency_page.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../dnp_identity_photo_page.dart';

class DnpCertificationJumpUtils {
  static void jump(String curDeveloping, String already,String belated,String title,
      {bool replace = false}) {
    Widget? childPage;
    if (curDeveloping == "wasa") {
      // ocr认证
      childPage = DnpIdentityPhotoPage(
        already: already,
        title:  title,
      );
    } else if (curDeveloping == "wasb") {
      // 个人信息 /haseye/ta
      childPage = DnpCertificationCommonFromPage(
        already: already,
        path: "/haseye/panta",
        submitPath: "/haseye/ta",
        nervous: "5",
        title:  title,
      );
    } else if (curDeveloping == "wasc") {
      // 个人信息 /haseye/shades
      childPage = DnpCertificationCommonFromPage(
        already: already,
        path: "/haseye/occasions",
        submitPath: "/haseye/shades",
        nervous: "6",
        title:  title,
      );
    } else if (curDeveloping == "wasd") {
      // 紧急联系人
      childPage = DnpEmergencyPage(already: already,title:  title,);
    } else if (curDeveloping == "wase") {
      // 绑卡
      childPage = DnpBrowserPage(path: belated);
    }
    if (childPage != null) {
      if (replace) {
        Get.off(childPage);
      } else {
        Get.to(childPage);
      }
    }
  }
}
